package com.lang.runtimeException;

import org.junit.Test;

public class Demo {
    /**
     * 返回当前的堆栈信息
     */
    @Test
    public void testGetStackTrace() {
        StackTraceElement[] stackTrace = new RuntimeException().getStackTrace();
        for (StackTraceElement s : stackTrace) {
            System.out.println(s);
        }
    }
}
